package com.sskj.lib.bean;

import com.sskj.common.util.NumberUtil;

import java.io.Serializable;
import java.util.List;

/**
 *
 */
public class WSFiveBean implements Serializable {


    /**
     * name : EOS/USDT
     * bids : [{"totalSize":"90.1274","price":"7.2726"},{"price":"7.2714","totalSize":"167.9623"},{"price":"7.2703","totalSize":"1517.5989"},{"totalSize":"259.5996","price":"7.2698"},{"totalSize":"18.4373","price":"7.2696"}]
     * code : EOS/USDT
     * timestamp : 1533128490
     * asks : [{"totalSize":"99.9766","price":"7.2802"},{"totalSize":"13.6686","price":"7.2805"},{"price":"7.2809","totalSize":"500"},{"totalSize":"183.2281","price":"7.2816"},{"totalSize":"140.153","price":"7.2819"}]
     */

    private String name;
    private String code;
    private List<FiveBean> bids;
    private List<FiveBean> asks;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


    public List<FiveBean> getBids() {
        return bids;
    }

    public void setBids(List<FiveBean> bids) {
        this.bids = bids;
    }

    public List<FiveBean> getAsks() {
        return asks;
    }

    public void setAsks(List<FiveBean> asks) {
        this.asks = asks;
    }

    public static class FiveBean implements Serializable {
        public FiveBean(String totalSize, String price) {
            this.totalSize = totalSize;
            this.price = price;
        }

        /**
         * totalSize : 90.1274
         * price : 7.2726
         */


        private String totalSize;
        private String price;

        public String getTotalSize() {
            return totalSize == null ? "--" : NumberUtil.keep4(totalSize);
        }

        public FiveBean setTotalSize(String totalSize) {
            this.totalSize = totalSize;
            return this;
        }

        public String getPrice() {
            return price == null ? "--" : NumberUtil.keep4(price);
        }

        public FiveBean setPrice(String price) {
            this.price = price;
            return this;
        }
    }


}